import React from "react"
import { createBrowserRouter } from "react-router-dom"

import MainLayout from "../layouts/MainLayout"
import ManageLayout from "../layouts/ManageLayout"
import QuestionLayout from "../layouts/QuestionLayout"
import Home from "../pages/Home"
import Login from "../pages/Login"
import Register from "../pages/Regitser"
import NotFound from "../pages/NotFound"
import List from "../pages/manage/List"
import Trash from "../pages/manage/Trash"
import Star from "../pages/manage/Star"
import Edit from "../pages/question/Edit"
import Stat from "../pages/question/Stat"

const router = createBrowserRouter([
  {
    path: "/",
    element: <MainLayout></MainLayout>,
    children: [
      {
        path: "/",
        element: <Home></Home>,
      },
      {
        path: "login",
        element: <Login></Login>,
      },
      {
        path: "register",
        element: <Register></Register>,
      },
      {
        
      }
      {
        path: "*", //404路由配置，都写在最后（兜底）
        element: <NotFound></NotFound>,
      },
    ],
  },
])

export default router
